;;======================================================================================================================
;;///// bootcode.inc /////////////////////////////////////////////////////////////////////////////////////// GPLv2 /////
;;======================================================================================================================
;; (c) 2011 Ostin project <http://ostin.googlecode.com/>
;; (c) 2004-2011 KolibriOS team <http://kolibrios.org/>
;; (c) 2000-2004 MenuetOS <http://menuetos.net/>
;;======================================================================================================================
;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
;; License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later
;; version.
;;
;; This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License along with this program. If not, see
;; <http://www.gnu.org/licenses/>.
;;======================================================================================================================

struct boot_menu_data_t
  title          dw ?
  items          dw ?
  submenus       dw ?
  current_index  dw ?
  print_callback dw ?
ends

;-----------------------------------------------------------------------------------------------------------------------

boot.data.main_menu_options dw \
  6, \
  boot.data.s_video_mode, \
  boot.data.s_use_bios_disks, \
  boot.data.s_boot_source, \
  0, \
  boot.data.s_save_and_boot, \
  boot.data.s_just_boot

boot.data.bool_menu_options dw \
  2, \
  boot.data.s_off, \
  boot.data.s_on

boot.data.boot_source_menu_options dw \
  4, \
  boot.data.s_boot_source_1, \
  boot.data.s_boot_source_2, \
  boot.data.s_boot_source_3, \
  boot.data.s_boot_source_4

;-----------------------------------------------------------------------------------------------------------------------

boot.data.main_menu_submenus dw \
  boot.data.video_mode_menu, \
  boot.data.use_bios_disks_menu, \
  boot.data.boot_source_menu, \
  0, \
  0, \
  0

;-----------------------------------------------------------------------------------------------------------------------

boot.data.main_menu: ; boot_menu_data_t
  dw boot.data.s_current_settings
  dw boot.data.main_menu_options
  dw boot.data.main_menu_submenus
  dw 0
  dw boot.print_main_menu_item

boot.data.video_mode_menu: ; boot_menu_data_t
  dw boot.data.s_video_mode_title
  dw boot.data.vmodes_count
  dw 0
  dw 0
  dw boot.print_vmode_menu_item

boot.data.use_bios_disks_menu: ; boot_menu_data_t
  dw boot.data.s_use_bios_disks_title
  dw boot.data.bool_menu_options
  dw 0
  dw 0
  dw boot.print_simple_menu_item

boot.data.boot_source_menu: ; boot_menu_data_t
  dw boot.data.s_boot_source_title
  dw boot.data.boot_source_menu_options
  dw 0
  dw 0
  dw boot.print_simple_menu_item

;-----------------------------------------------------------------------------------------------------------------------

; SmShadow by Glenn Chappell 4/93 - based on Small
; modified by Paul Burton <solution@earthlink.net> 12/96
; generated by http://patorjk.com/software/taag/
boot.data.s_logo:
  db "   _ \    __| __ __| _ _|   \ |", 13, 10
  db "  (   | \__ \    |     |   .  |", 13, 10
  db " \___/  ____/   _|   ___| _|\_|", 0
  .width = 31
  .height = 3

boot.data.s_version_number db "0.1pre", 0

boot.data.s_inactive_item_prefix db '   ', 0
boot.data.s_active_item_prefix   db ' > ', 0

boot.data.old_int8_handler dd ?
boot.data.timer_start_time dd ?
boot.data.loader_block     dd -1

boot_dev        db 0 ; 0 = floppy, 1 = hd

BPB_SecPerTrk   dw 0 ; sectors per track
BPB_NumHeads    dw 0 ; number of heads
BPB_FATSz16     dw 0 ; size of FAT
BPB_RootEntCnt  dw 0 ; count of root dir. entries
BPB_BytsPerSec  dw 0 ; bytes per sector
BPB_RsvdSecCnt  dw 0 ; number of reserved sectors
BPB_TotSec16    dw 0 ; count of the sectors on the volume
BPB_SecPerClus  db 0 ; number of sectors per cluster
BPB_NumFATs     db 0 ; number of FAT tables
abs_sector_adj  dw 0 ; adjustment to make abs. sector number
end_of_FAT      dw 0 ; end of FAT table
FirstDataSector dw 0 ; begin of data
